#include <iostream>
#include <string>
using namespace std;

#include "Logger.h"
using namespace sf::toolsLog;


int main()
{
    Logger::instance()->open("./test.log");

    // 设置日志级别为 INFO
    Logger::instance()->level(Logger::DEBUG); 

    // 设置日志上限 
    Logger::instance()->max(1024);

    // Logger::instance()->log(Logger::DEBUG, __FILE__, __LINE__, "hello world!");
    // Logger::instance()->log(Logger::DEBUG, __FILE__, __LINE__, "name:%s age:%d", "jack", 188);

    debug("hello world!");
    debug("name:%s age:%d", "shaofeng", 18);
    info("info message");
    warn("warn message");
    error("error message");
    fatal("fatal message");

    return 0;
}
